<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="CKS.FormsBasedAuthentication.RolesDisp, CKS.FormsBasedAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d0c9b215512a2c5d"  %>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="~/_controltemplates/ToolBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="~/_controltemplates/ToolBarButton.ascx" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="CKS" Namespace="CKS.FormsBasedAuthentication" Assembly="CKS.FormsBasedAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d0c9b215512a2c5d" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <SharePoint:EncodedLiteral ID="PageTitle" Text="Manage Forms Based Authentication Users and Roles" EncodeMethod="HtmlEncode" runat="server"/>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    <SharePoint:EncodedLiteral ID="TitleArea" Text="Manage Forms Based Authentication Users and Roles" EncodeMethod="HtmlEncode" runat="server"/>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderPageDescription" runat="server">
    <asp:PlaceHolder ID="ToolBarPlaceHolder" runat="server">
        Use this page to manage forms based authentication roles.
        <div style="padding-top: 4px;">
            <wssuc:ToolBar id="onetidNavNodesTB" runat="server">
                <Template_Buttons>
                    <wssuc:ToolBarButton 
                        runat="server"
	                    Text="New User"
	                    id="idNewNavNode"
	                    ToolTip="New User"
	                    NavigateUrl="UserNew.aspx"
	                    ImageUrl="/_layouts/images/newitem.gif"
	                    AccessKey="U"/>
                    <wssuc:ToolBarButton 
                        runat="server"
	                    Text="New Role"
	                    id="idNewCatNode"
	                    ToolTip="New Role"
	                    NavigateUrl="RoleNew.aspx"
	                    ImageUrl="/_layouts/images/newitem.gif"
	                    AccessKey="R"/>
                </Template_Buttons>
            </wssuc:ToolBar>
        </div>
    </asp:PlaceHolder>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderMain" runat="server">    
    <SharePoint:MenuTemplate ID="RoleMenu" runat="server">
        <SharePoint:MenuItemTemplate ID="DeleteRole" runat="server" Text="Delete" ImageUrl="/_layouts/images/delete.gif" ClientOnClickNavigateUrl="RoleDelete.aspx?Role=%ROLE%" Title="Delete"></SharePoint:MenuItemTemplate>
    </SharePoint:MenuTemplate>
    
    <CKS:FBADataSource runat="server" ID="RoleDataSource" ViewName="FBARolesView" />
            
    <SharePoint:SPGridView 
        ID="RoleGrid"
        runat="server"
        DataSourceID="RoleDataSource"
        AutoGenerateColumns="false"        
        AllowPaging="true"  
        PageSize="3"
        AllowSorting="true">
        
        <Columns>
            <SharePoint:SPMenuField  
                HeaderText="Role" 
                TextFields="Role"
                MenuTemplateId="RoleMenu"
                NavigateUrlFields="Role" 
                NavigateUrlFormat="RoleDelete.aspx?Role={0}" 
                TokenNameAndValueFields="ROLE=Role" 
                SortExpression="Role" />
             <SharePoint:SPBoundField 
                HeaderText="Users In Role"
                DataField="UsersInRole" 
                SortExpression="UsersInRole" />
        </Columns>
    </SharePoint:SPGridView>
    
    <SharePoint:SPGridViewPager ID="SPGridViewPagerRoleMenu" GridViewId="RoleGrid" runat="server" />
    
    <p>
        <asp:Label runat="server" ID="lblMessage" ForeColor="Red" />
    </p>
</asp:Content>